import { ApiProperty } from '@nestjs/swagger';
import { IsInt, Min, Length, validate, IsEmpty, IsString, IsNotEmpty } from 'class-validator';
export class CreateUserDto {
  @ApiProperty({
    type: String,
    description: '账号',
    required: true,
    default: 'admin',
  })
  @IsNotEmpty({ message: '用户名不能为空' })
  @IsString({ message: '用户名必须是字符串' })
  username: string

  @ApiProperty({
    type: String,
    description: '密码',
    required: true,
    default: '123456',
  })
  @IsNotEmpty({ message: '密码不能为空' })
  @IsString({ message: '密码必须是字符串' })
  password: string
}
